package com.gavin.demo4fresco.module.navigation;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.gavin.demo4fresco.R;
import com.gavin.demo4fresco.adapters.ScaleAdapter;
import com.gavin.demo4fresco.utils.InitUtil;
import com.gavin.demo4fresco.widgets.DividerItemDecoration;

public class ScaleDemoActivity extends AppCompatActivity {
    private RecyclerView mRecyclerView;
    private ScaleAdapter mScaleAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_scale_demo);

        mScaleAdapter = new ScaleAdapter(this, InitUtil.initScalePictureObj());
        mRecyclerView = (RecyclerView) findViewById(R.id.scale_recycleview);
        mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
        mRecyclerView.setAdapter(mScaleAdapter);
        mRecyclerView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
        mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    }
}
